// 导入二次封装axios
import koi from "@/utils/axios.ts";


// 统一管理接口
enum API {
  CAPTCHA_GEN = "/auth/graph/captcha/gen",  
  DO_LOGIN = "/auth/login/doLogin",
  GET_PUBLICKEY = "/auth/login/getPublicKey",
  LOGOUT = "/auth/login/logout",
}

// 登录
export const koiLogin = (params: any) => {
  return koi.post(API.DO_LOGIN, params);
};
// 登出
export const logout = () => {
  return koi.post(API.LOGOUT);
};

// 获取验证码
export const getCaptcha = () => {
  return koi.post(API.CAPTCHA_GEN);
};
// 获取公钥
export const getPublicKey = () => {
  return koi.post(API.GET_PUBLICKEY);
};
